'use strict';
const Controller = require('egg').Controller;

 class ListController extends Controller {
    async index(){
        const { ctx } = this
        var {m} = ctx.params
        var res = await ctx.service.movie.find(m)
        if (res.length) {
            ctx.body = {
                status:200,
                msg:m,
                res
            }
        }else{
            ctx.status = 400
            ctx.body = {
                status:400,
                msg:"输入api的参数不合法"
            }
        }
       
    }
 }


module.exports = ListController